import { message } from 'antd';
import themeColorClient from './themeColorClient';

export const updateTheme = newPrimaryColor => {
  // const hideMessage = message.loading('正在切换主题！', 0)
  themeColorClient.changeColor(newPrimaryColor)
    // .finally(() => hideMessage())
}

export const initTheme = () =>{
  let themeColor = localStorage.getItem('themeColor')
  if(themeColor != null) {
    updateTheme(themeColor);
  }
}

